package com.carhome.adapter;

import java.util.ArrayList;
import java.util.List;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;

public class CarMainFragmentAdapter extends FragmentPagerAdapter{
	private List<Fragment> mFragments;
	public CarMainFragmentAdapter(FragmentManager fm) {
		super(fm);
		mFragments = new ArrayList<Fragment>();
	}
	public void addTab(Fragment fragment)
	{
		mFragments.add(fragment);
	}
	public Fragment getItem(int position) {
		return mFragments.get(position);
	}

	public int getCount() {
		return mFragments.size();
	}
	@Override
	public Object instantiateItem(View container, int position) {
		return super.instantiateItem(container, position);
	}
}
